
package org.cuatrovientos.mazmorra;


import java.util.Scanner;


/**
 * 
 * @author mikel_luquin
 *
 */
public class Main {

	public static void main(String[] args) {
		int option=0;
		int manydices=0;
		int faces=0;
		Dice dice= null;
		String line="";
		Scanner reader=new Scanner(System.in);
		
		do{
			System.out.println("1-Made a dice");
			System.out.println("2-Roll the dice");
			System.out.println("3-Exit");
			line=reader.nextLine();
			option=Integer.parseInt(line);
			switch(option){
			case 1:
				System.out.println("How many faces have your dice?");
				line=reader.nextLine();
				faces=Integer.parseInt(line);
				System.out.println("One of the faces can be zero?(S/N)");
				line=reader.nextLine();

				if (line.charAt(0)=='S'){
					 dice = new Dice(faces,true);
				}else{
					dice = new Dice(faces,false);
				}
				System.out.println("Ready to roll the dice!!");
				break;
				
			case 2:
				System.out.println(dice.MoreDices());
				System.out.println("How many dices are you going to use?");
				line=reader.nextLine();
				manydices=Integer.parseInt(line);
				for (int i = 0; i<manydices;i++){
					System.out.println(dice.MoreDices());
				}
				break;
			}
		
		}while(option != 3);
		reader.close();
		System.out.println("The End");
	}

}
